export const swipeCellBehaviors = Behavior({

  methods: {
    // 滑动列表
    swipeCellOpen(e) {
      console.log(this.data)
      let cellItem = this.selectComponent(`#${e.target.id}`)
      this.data.swipeCellList.push(cellItem)
    },

    // 点击空白区域关闭滑块
    swipeCellClose() {
      this.closeFn()
    },

    // 点击单元格关闭滑块
    swipeCellClick() {
      this.closeFn()
    },

    // 关闭
    closeFn() {
      this.data.swipeCellList.forEach(item => item.close())
      this.data.swipeCellList = []
    }
  }
})